﻿import 'package:azring/core/controllers/version_controller.dart';
import 'package:get/get.dart';
import 'settings_view.dart';
import 'profile/profile_view.dart';
import 'profile/profile_logic.dart';
import 'profile/security/security_view.dart';
import 'profile/security/security_logic.dart';
import 'profile/nickname/nickname_view.dart';
import 'profile/nickname/nickname_logic.dart';
import 'profile/career/career_view.dart';
import 'profile/career/career_logic.dart';
import 'profile/change_password/change_password_view.dart';
import 'profile/change_password/change_password_logic.dart';
import 'notification/notification_view.dart';
import 'notification/notification_logic.dart';
import 'ring/ring_view.dart' as settings_ring;
import 'ring/ringSetting_logic.dart';
import 'ring_info/ring_info_view.dart';
import 'feedback/feedback_view.dart';
import 'feedback/feedback_logic.dart';
import 'feedback/feedback_history_view.dart';
import 'feedback/feedback_detail_view.dart';
import 'ring_info/firmware_info/firmware_info_view.dart';
import 'ring_info/firmware_info/firmware_info_logic.dart';
import 'ring_info/warranty_status/warranty_status_view.dart';
import 'ring_info/warranty_status/warranty_status_logic.dart';
import 'version/version_view.dart';

/// 设置模块路由配置
class SettingsRoutes {
  /// 设置主页
  static const String settings = '/settings';

  /// 个人信息页
  static const String profile = '/settings/profile';

  /// 账号安全页
  static const String security = '/settings/profile/security';

  /// 昵称编辑页
  static const String nickname = '/settings/profile/nickname';

  /// 职业编辑页
  static const String career = '/settings/profile/career';

  /// 修改密码页
  static const String changePassword = '/settings/profile/change-password';

  /// 提醒设置页
  static const String notification = '/settings/notification';

  /// 戒指设置页
  static const String ring = '/settings/ring';

  /// 戒指信息页
  static const String ringInfo = '/settings/ring-info';

  /// 固件信息页
  static const String firmware = '/settings/ring-info/firmware';

  /// 保修状态页
  static const String warranty = '/settings/ring-info/warranty';

  /// 意见反馈页
  static const String feedback = '/settings/feedback';

  /// 意见反馈历史
  static const String feedbackHistory = '/settings/feedback/history';

  /// 意见反馈详情
  static const String feedbackDetail = '/settings/feedback/detail';

  /// 版本管理页
  static const String version = '/settings/version';

  static final List<GetPage> routes = [
    GetPage(
      name: settings,
      page: () => const SettingsView(),
    ),
    GetPage(
      name: profile,
      page: () => const SettingsProfileView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => SettingsProfileLogic());
      }),
    ),
    GetPage(
      name: security,
      page: () => const SecurityView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => SecurityLogic());
      }),
    ),
    GetPage(
      name: nickname,
      page: () => const NicknameView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => NicknameLogic());
      }),
    ),
    GetPage(
      name: career,
      page: () => const CareerView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => CareerLogic());
      }),
    ),
    GetPage(
      name: changePassword,
      page: () => const ChangePasswordView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ChangePasswordLogic());
      }),
    ),
    GetPage(
      name: notification,
      page: () => const NotificationView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => NotificationLogic());
      }),
    ),
    GetPage(
      name: ring,
      page: () => const settings_ring.RingView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => RingSettingLogic());
      }),
    ),
    GetPage(
      name: ringInfo,
      page: () => const RingInfoView(),
    ),
    GetPage(
      name: firmware,
      page: () => const FirmwareInfoView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => FirmwareInfoLogic());
      }),
    ),
    GetPage(
      name: warranty,
      page: () => const WarrantyStatusView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => WarrantyStatusLogic());
      }),
    ),
    GetPage(
      name: feedback,
      page: () => const FeedbackView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => FeedbackLogic());
      }),
    ),
    GetPage(
      name: feedbackHistory,
      page: () => const FeedbackHistoryView(),
    ),
    GetPage(
      name: feedbackDetail,
      page: () => const FeedbackDetailView(),
    ),
    GetPage(
      name: version,
      page: () => const VersionView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => VersionController());
      }),
    ),
  ];
}
